home *** CD-ROM | disk | FTP | other *** search
/ SPACE 1 / SPACE - Library 1 - Volume 1.iso / games / 299 / poker_di.ce / pokerdoc.txt < prev   
Text File  |  1987-06-22  |  9KB  |  159 lines

  1.  
  2. Poker Dice
  3.  
  4. by Mike McCarthy
  5.  
  6.  
  7.  Poker Dice is a totally mouse-controlled computer adaptation of a popular
  8. board game, in which players roll dice and try to make poker hands out of the
  9. numbers rolled.  Poker Dice can be played by one to four players, in high or
  10. medium resolution.
  11.  
  12.  
  13. Getting started.
  14.  
  15.  First you must load ST BASIC.  If you load TOS from disk, you will need to
  16. disable buffered graphics in order to free up enough memory to enter Poker
  17. Dice.  Once you have typed in the program and saved a copy to disk, you're
  18. ready to run it.  Select the RUN option on the run menu.
  19.  
  20.  
  21. The layout.
  22.  
  23.  The first screen displayed is used to select the number of players.  Just
  24. position the mouse cursor on the die with the number corresponding to the
  25. number of players desired, then click the left button once.  The dice will be
  26. erased and the game screen will be displayed.  Note that BASIC is very slow in
  27. responding to the mouse button; you'll have to hold the button down longer than
  28. you normally would.  Do not try to use the scroll bars on the window border!
  29. If you do, the display will be scrambled and you'll have to restart the game.
  30.  
  31.  All game functions are performed by pointing with the mouse and clicking with
  32. the left button.  In the upper left corner of the screen is the ROLL command.
  33. Pointing and clicking on this area will roll the dice.  The number below ROLL
  34. indicates how many times a player has already rolled the dice during that turn
  35. (each player gets three rolls per turn).  Below this is the UNDO command.  More
  36. about this feature later.  In the upper right of the screen is the NEXT
  37. command.  Clicking here will start a new game (regardless of where you are in
  38. the current one).  Under NEXT is the QUIT command, which allows you to
  39. terminate a game at any time and return to BASIC.
  40.  
  41.  The rest of the screen is divided into five areas.  The ROLL area is at top
  42. center; here the dice are displayed when they are ROLLed.  To the far right is
  43. the HOLD area.  If a player does not want to roll certain dice during a turn,
  44. they can be held here.  The HEADER area is where the PLAYER labels are written;
  45. an arrow points to the player whose turn it currently is.  Player scores are
  46. displayed in the SCORE area, the large central portion of the screen.  The
  47. OPTION area, containing a list of all the scoring options, is at the left.
  48.  
  49.  
  50. The game.
  51.  
  52.  The object of Poker Dice is to score more points than your opponent(s), by
  53. filling in as many scoring options as possible.  This requires a certain amount
  54. of skill and a lot of luck.
  55.  
  56.  You begin the game by clicking on the ROLL command.  Five randomly rolled dice
  57. will be displayed in the ROLL area.  Now you decide which of the scoring
  58. options can best be matched with this combination of dice.  You have the option
  59. of rolling all five dice again to get a better result, or of holding some of
  60. the dice in the HOLD area and rolling only the remaining ones.  For example, if
  61. you rolled two sixes and three other numbers, the sixes could be placed in the
  62. HOLD area and the remaining dice rolled again, to try to get more sixes to
  63. improve the score.  To hold a die, simply point at it and click.  It will be
  64. erased and redrawn in the HOLD area.  It can be moved back to the ROLL area by
  65. the reverse process.  Let's say that you get another six on the second roll.
  66. You would HOLD this six and roll the two remaining dice for the last roll of
  67. the turn.  If no more sixes came up, then you would choose your scoring option
  68. at this point.  You could choose sixes by pointing to the word SIXES in the
  69. OPTION area and clicking.  The score is automatically displayed under the
  70. column header (in high resolution a running total is also displayed at the
  71. bottom of the screen).
  72.  
  73.  If, after you clicked on SIXES, you decided that you would rather score 3 OF A
  74. KIND, you would click on the UNDO command, and the SIXES score would be
  75. removed.  You could then click on 3 OF A KIND, and a new score would be
  76. displayed.  UNDO can only be used before the next player's first roll.  Once
  77. you have clicked on your score (and relinquished the mouse), it is the next
  78. player's turn.  The arrow will point to that person's PLAYER header, and the
  79. number of rolls will be reset to 0.
  80.  
  81.  The game continues until each player has filled in all options.  You must fill
  82. in one option each turn, and each option can only be filled in once per player
  83. in a game; you cannot add to the score of an option on a subsequent turn.  In
  84. some cases, this means that you will be forced to put a 0 in some option(s) if
  85. you were unlucky enough not to match any option, or only matched an option
  86. which already had a score assigned.  Determining how best to use each roll is
  87. part of the skill of the game.
  88.  
  89.  When the last player finishes his last turn, Poker Dice calculates the totals,
  90. adds bonuses where applicable, and identifies the player with the highest score
  91. as the winner.  The total scores will be displayed on the bottom line of the
  92. screen.  At that point, you can click on NEW to start a new game, or on QUIT to
  93. return to BASIC.
  94.  
  95.  
  96. The scoring.
  97.  
  98.  Poker Dice calculates all scores and totals for you, but you need to know how
  99. it works to choose your options correctly.  For the top six options, the score
  100. is calculated by adding the face value of the dice which match the category
  101. name.  For example, to score FOUR, you would add all your FOURs together.  Any
  102. dice which are not FOURs are ignored.  So three FOURs would yield a score of
  103. 12.  Four FOURs would be 16.  If you were scoring TWOs, then three TWOs would
  104. yield a score of 6, and so on.  If the total of a player's top six options is
  105. 63 or more (63 is achieved by filling in each option with three dice of the
  106. required value) at the end of the game, then a bonus of 35 points is awarded.
  107.  
  108.  The scores for 3 OF A KIND and 4 OF A KIND are tallied by adding the face
  109. value of all five dice.  A FULL HOUSE (two of one kind and three of another) is
  110. always worth 25 points.  A SHORT STRAIGHT (at least four consecutive dice, for
  111. example:  2-3-4-5) is always 30 points, a LONG STRAIGHT (five consecutive dice,
  112. for example:  2-3-4-5-6) is always 40 points.  A GRAND SLAM (all five dice the
  113. same, for example:  6-6-6-6-6) is always 50 points.  The CHOICE option is a
  114. safety valve.  You can use it once when you haven't matched anything else.
  115. CHOICE is scored by adding the face value of all five dice.
  116.  
  117.  
  118. The program.
  119.  
  120.  The flow of the program is straightforward.  The first section dimensions
  121. arrays and initializes all variables.  Note that the program chooses between
  122. two complete sets of data statements, depending on the resolution of your
  123. monitor.  The next section sets up the initial screen and prompts for the
  124. number of players.  Once the number of players is set, the rest of the game
  125. screen is displayed.
  126.  
  127.  The heart of Poker Dice is what I call the "Game Control Loop." Here, the
  128. program waits for you to click the mouse button and, based on the X- and
  129. Y-coordinates of the mouse, calls a subroutine to process the function you
  130. requested (the method for getting the mouse coordinates and button position is
  131. described in Appendix H of the ST BASIC manual).  One of the nice features of
  132. ST BASIC is the ability to reference subroutines by name.  This makes a program
  133. much easier to read and understand.
  134.  
  135.  The remainder of the program consists of the subroutines to process requests
  136. from the Game Control Loop.  The subroutine names and accompanying comments
  137. should provide enough explanation for you to understand the purpose of each.
  138.  
  139.  
  140. Enhancements.
  141.  
  142.  Of course, a programmer seldom considers a program finished.  There is always
  143. one more feature to include.  I would like to make use of the ST's sound
  144. capabilities to make the game a little more lively.  Also, saving a running
  145. total of scores over several games would be nice, as well as saving the high
  146. score to disk, and maybe playing against the computer...But rather than never
  147. finish, I decided to leave the game as it is and see what enhancements others
  148. come up with.  Whether you attempt some or just play the game, I hope you have
  149. fun in the process.
  150.  
  151.  
  152. Author's Biography:
  153.  
  154.  Mike McCarthy, with degrees in History and Computer Systems, has worked on IBM
  155. mainframe computers for ten years.  He's currently a database systems analyst
  156. in South Florida.  He bought his first Atari (an 800) in 1982 and has enjoyed
  157. experimenting with different programming languages since.
  158.  
  159. ə